<!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US" xmlns:th="http://www.thymeleaf.org"> <!--<![endif]-->
<head>
    <!-- META TAGS -->
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>个人中心</title>

    <link rel="shortcut icon" href="../static/asserts/images/login_logo.png" />

    <!-- Style Sheet-->
    <link rel='stylesheet' id='bootstrap-css-css'  href='../static/asserts/css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='responsive-css-css'  href='../static/asserts/css/responsive5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='pretty-photo-css-css'  href='../static/asserts/js/prettyphoto/prettyPhotoaeb9.css' type='text/css' media='all' />
    <link rel='stylesheet' id='main-css-css'  href='../static/asserts/css/main.css' type='text/css' media='all' />

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="../static/asserts/js/html5.js"></script></script>
    <![endif]-->
    <script>
        $(function(){
            $("#userHead").click(function(){
                $("#btn_file").click();//隐藏了input:file样式，点击头像就可以选择文件
                $("#btn_file").on("change",function(){
                    var objUrl = getObjectUrl(this.files[0]);//获取图片的路径，该路径不是图片在本地的路径
                    if(objUrl){
                        $("userHead").attr("src",objUrl);//将图片路径存入src,显示图片
                    }
                });

            });


        });

        function getObjectUrl(file){
            var url = null;
            if(window.createObjectURL != undefined){//basic
                url = window.createObjectURL(file);
            }else if(window.URL != undefined){//mozila(firefox)
                url = window.URL.createObjectURL(file);
            }else if(window.webkitURL != undefined){//webkit or chrome
                url = window.webkitURL.createObjectURL(file);
            }
            return url;

        }
    </script>

</head>

<body>
<!-- Start of Header -->
<div th:replace="commons/bar::topbar(activeUri='userspace')"></div>
<!-- End of Header -->

<!-- Start of Search Wrapper -->
<div class="search-area-wrapper">
    <div class="search-area container" th:switch="${session.status}">
        <div class="profile" style="margin:10px auto;text-align:center;width: 120px" >
            <img alt="" th:src="@{/showImg/}+${session.otherusrheadImg}" style="border-radius:50%" height="100" width="100"><br>
        </div>
        <h3 class="search-header">[[${session.otherloginuser}]]</h3>
        <p class="search-tag-line" th:text="ta的权限等级为+':'+(${session.otherlevel}==0?神圣的管理员:(${session.otherlevel}+','+距离下一等级还差+':'+${session.otherrestExp}+经验))"> [[${session.otherlevel}]]</p>
        <p class="search-tag-line" th:case="true">ta的状态为 畅所欲言</p>
        <p class="search-tag-line" th:case="false">ta的状态为 禁言</p>

        <form id="search-form" class="search-form clearfix" method="get" th:action="@{/otheruserspace/search}" autocomplete="off">
            <input class="search-term required" type="text" id="s" name="searchname" placeholder="搜索我的帖子" title="搜索我的帖子" />
            <input class="search-btn" type="submit" value="搜索" />
            <div id="search-error-container"></div>
        </form>
        <div style="color: white; font-size: 17px; text-align: center; margin-top: 40px; margin-bottom: 0px"><b th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></b></div>
    </div>
</div>
<!-- End of Search Wrapper -->

<!-- Start of Page Container -->
<div class="page-container">
    <div class="container">
        <div class="row">

            <!-- start of page content -->
            <div class="page-container">
                <div class="container">
                    <div class="row">

                        <!-- start of page content -->
                        <div class="span8 main-listing">


                            <article class="format-standard type-post hentry clearfix" th:each="article:${otherarticles}">

                                <header class="clearfix">

                                    <h3 class="post-title">
                                        <a href="single.html" th:text="${article.title}==null?${article.id}:${article.title}" th:href="@{/showBlog/}+${article.id}"></a>
                                    </h3>

                                    <div class="post-meta clearfix">
                                        <span class="date" th:text="${article.dateformat}==null?'暂无日期':${article.dateformat}"></span>
                                        <span class="author" th:text="${article.author}==null?'暂无作者':${article.author}"></span>
                                        <span  class="category" th:text="${article.categoryName}" ></span>
                                        <span class="comments"><a href="#" th:text="${article.reply_cnt}+回复" th:href="@{/showBlog/}+${article.id}">3 回复</a></span>
                                        <span class="like-count" th:text="${article.likes}" ></span>
                                        <span class="like-count" th:text="等级要求+${article.level}"></span>
                                    </div><!-- end of post meta -->
                                    <p th:text="${article.summary}==null?'暂无简介':${article.summary}"></p>
                                </header>
                            </article>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End of Page Container -->


<a href="#top" id="scroll-top"></a>

<!-- script -->
<script type='text/javascript' src='../static/asserts/js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.easing.1.34e44.js?ver=1.3'></script>
<script type='text/javascript' src='../static/asserts/js/prettyphoto/jquery.prettyPhotoaeb9.js?ver=3.1.4'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.liveSearchd5f7.js?ver=2.0'></script>
<script type='text/javascript' src='../static/asserts/js/jflickrfeed.js'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.formd471.js?ver=3.18'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.validate.minfc6b.js?ver=1.10.0'></script>
<script type='text/javascript' src='../static/asserts/js/custom5152.js?ver=1.0'></script>
</body>
</html>
